//
//  SearchRequestManager.m
//  TrainTree
//
//  Created by wanghui on 2017/10/4.
//  Copyright © 2017年 YouYeShu. All rights reserved.
//

#import "SearchRequestManager.h"

@implementation SearchRequestManager

+ (void)requestSearchDataWithKeyWord:(NSString *)keyWord responseBlock:(ResponseData)responseBlock
{
    RequestParam *param = [[RequestParam alloc]init];
    [param setRequestPath:TrainTreeSearchURL];
    [param setString:keyWord forKey:@"keyword"];
    [[HttpClient shareInstanceClient] PostReqeustParameter:param response:^(id JSONData, NSError *error, NSURLSessionDataTask *dataTask) {
        if (JSONData) {
            responseBlock(JSONData, error, dataTask);
        }else{
            [SVProgressHUD showErrorWithStatus:@"数据请求失败，请检查网络"];
        }
    }];
}
@end
